From: Andrew Cooper Date: Fri, 14 Mar 2014 08:42:28 +0000 (+0100) Subject: functional cleanup for __attribute__((packed)) changes X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5446 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=f8be76e2fe2f7c014011b3b137b6692566a7d6a2;p=xen.git functional cleanup for __attribute__((packed)) changes This is to separate the functional changes from the noop consistency changes. * Pack struct cper_mce_record rather than creating a structure named __packed * Remove unreferenced struct xgt_desc * Use two u16's rather than two u32 16-bit bitfields Signed-off-by: Andrew Cooper Acked-by: Keir Fraser Also drop now pointless (and always having been bogus) pack pragmas. Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/cpu/mcheck/mce-apei.c b/xen/arch/x86/cpu/mcheck/mce-apei.c index 337034122a..9488dbd37e 100644 --- a/xen/arch/x86/cpu/mcheck/mce-apei.c +++ b/xen/arch/x86/cpu/mcheck/mce-apei.c @@ -44,7 +44,6 @@ UUID_LE(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \ 0x04, 0x4a, 0x38, 0xfc) -#pragma pack(1) /* * CPER specification (in UEFI specification 2.3 appendix N) requires * byte-packed. @@ -53,9 +52,7 @@ struct cper_mce_record { struct cper_record_header hdr; struct cper_section_descriptor sec_hdr; struct mce mce; -} __packed; -/* Reset to default packing */ -#pragma pack() +} __attribute__((packed)); int apei_write_mce(struct mce *m) { diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 9ffb4af709..4b886e5d2d 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -670,11 +670,6 @@ void vmx_vmcs_exit(struct vcpu *v) } } -struct xgt_desc { - unsigned short size; - unsigned long address __attribute__((packed)); -}; - static void vmx_set_host_env(struct vcpu *v) { unsigned int cpu = smp_processor_id(); diff --git a/xen/common/trace.c b/xen/common/trace.c index 41ddc336e1..73ba57c915 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -643,7 +643,7 @@ static inline void insert_lost_records(struct t_buf *buf) { struct { u32 lost_records; - u32 did:16, vid:16; + u16 did, vid; u64 first_tsc; } __attribute__((packed)) ed;